/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for 
 * full list of contributors). Published under the 2-clause BSD license.
 * See license.txt in the OpenLayers distribution or repository for the
 * full text of the license. */


/**
 * requires OpenLayers/Control.js
 * requires OpenLayers/Control/SelectFeature.js
 * requires OpenLayers/Feature/Vector.js
 * requires OpenLayers/Handler/Feature.js
 * requires OpenLayers/Layer/Vector/RootContainer.js
 */

/**
 * Class: OpenLayers.Control.SelectFeatureDouble
 * The SelectFeatureDouble control selects vector features from a given layer on 
 * click.
 *
 * Inherits from:
 *  - <OpenLayers.Control.SelectFeature>
 */
OpenLayers.Control.SelectFeatureDouble = OpenLayers.Class(OpenLayers.Control.SelectFeature, {
    initialize: function(layers, options) {
        OpenLayers.Control.SelectFeature.prototype.initialize.apply(this, [layers, options]);
        this.handlers = {
            feature: new OpenLayers.Handler.FeatureDoubleClick(
                this, this.layer, this.callbacks, {
                    geometryTypes: this.geometryTypes,
                    stopDouble: true
                }
            )
        };
    },
    CLASS_NAME: "OpenLayers.Control.SelectFeatureDouble"
});